package com.Qinmeiwei.web.pojo.base;

import java.io.Serializable;


/**
 * This is an object that contains data related to the dynamic_type table.
 * Do not modify this class because it will be overwritten if the configuration file
 * related to this class is modified.
 *
 * @hibernate.class
 *  table="dynamic_type"
 */

public abstract class BaseDynamicType  implements Serializable {

	public static String REF = "DynamicType";
	public static String PROP_NOUN = "noun";
	public static String PROP_TARGET_USER_TEMPLATE = "targetUserTemplate";
	public static String PROP_TITLE_TEMPLATE = "titleTemplate";
	public static String PROP_TEMPLATE = "template";
	public static String PROP_VERB = "verb";
	public static String PROP_USER_TEMPLATE = "userTemplate";
	public static String PROP_HANDLE_TEMPLATE = "handleTemplate";
	public static String PROP_URL_TEMPLATE = "urlTemplate";
	public static String PROP_ADVERB = "adverb";
	public static String PROP_TEMPLATE_MORE = "templateMore";
	public static String PROP_ID = "id";
	public static String PROP_CONTENT_TEMPLATE = "contentTemplate";
	public static String PROP_ICON = "icon";


	// constructors
	public BaseDynamicType () {
		initialize();
	}

	/**
	 * Constructor for primary key
	 */
	public BaseDynamicType (java.lang.String id) {
		this.setId(id);
		initialize();
	}

	protected void initialize () {}



	private int hashCode = Integer.MIN_VALUE;

	// primary key
	private java.lang.String id;

	// fields
	private java.lang.String icon;
	private java.lang.String userTemplate;
	private java.lang.String targetUserTemplate;
	private java.lang.String titleTemplate;
	private java.lang.String urlTemplate;
	private java.lang.String contentTemplate;
	private java.lang.String handleTemplate;
	private java.lang.String verb;
	private java.lang.String adverb;
	private java.lang.String noun;
	private java.lang.String template;
	private java.lang.String templateMore;

	// collections
	private java.util.Set<com.Qinmeiwei.web.pojo.Dynamic> dynamics;



	/**
	 * Return the unique identifier of this class
     * @hibernate.id
     *  generator-class="native"
     *  column="event_code"
     */
	public java.lang.String getId () {
		return id;
	}

	/**
	 * Set the unique identifier of this class
	 * @param id the new ID
	 */
	public void setId (java.lang.String id) {
		this.id = id;
		this.hashCode = Integer.MIN_VALUE;
	}




	/**
	 * Return the value associated with the column: icon
	 */
	public java.lang.String getIcon () {
		return icon;
	}

	/**
	 * Set the value related to the column: icon
	 * @param icon the icon value
	 */
	public void setIcon (java.lang.String icon) {
		this.icon = icon;
	}



	/**
	 * Return the value associated with the column: user_template
	 */
	public java.lang.String getUserTemplate () {
		return userTemplate;
	}

	/**
	 * Set the value related to the column: user_template
	 * @param userTemplate the user_template value
	 */
	public void setUserTemplate (java.lang.String userTemplate) {
		this.userTemplate = userTemplate;
	}



	/**
	 * Return the value associated with the column: target_user_template
	 */
	public java.lang.String getTargetUserTemplate () {
		return targetUserTemplate;
	}

	/**
	 * Set the value related to the column: target_user_template
	 * @param targetUserTemplate the target_user_template value
	 */
	public void setTargetUserTemplate (java.lang.String targetUserTemplate) {
		this.targetUserTemplate = targetUserTemplate;
	}



	/**
	 * Return the value associated with the column: title_template
	 */
	public java.lang.String getTitleTemplate () {
		return titleTemplate;
	}

	/**
	 * Set the value related to the column: title_template
	 * @param titleTemplate the title_template value
	 */
	public void setTitleTemplate (java.lang.String titleTemplate) {
		this.titleTemplate = titleTemplate;
	}



	/**
	 * Return the value associated with the column: url_template
	 */
	public java.lang.String getUrlTemplate () {
		return urlTemplate;
	}

	/**
	 * Set the value related to the column: url_template
	 * @param urlTemplate the url_template value
	 */
	public void setUrlTemplate (java.lang.String urlTemplate) {
		this.urlTemplate = urlTemplate;
	}



	/**
	 * Return the value associated with the column: content_template
	 */
	public java.lang.String getContentTemplate () {
		return contentTemplate;
	}

	/**
	 * Set the value related to the column: content_template
	 * @param contentTemplate the content_template value
	 */
	public void setContentTemplate (java.lang.String contentTemplate) {
		this.contentTemplate = contentTemplate;
	}



	/**
	 * Return the value associated with the column: handle_template
	 */
	public java.lang.String getHandleTemplate () {
		return handleTemplate;
	}

	/**
	 * Set the value related to the column: handle_template
	 * @param handleTemplate the handle_template value
	 */
	public void setHandleTemplate (java.lang.String handleTemplate) {
		this.handleTemplate = handleTemplate;
	}



	/**
	 * Return the value associated with the column: verb
	 */
	public java.lang.String getVerb () {
		return verb;
	}

	/**
	 * Set the value related to the column: verb
	 * @param verb the verb value
	 */
	public void setVerb (java.lang.String verb) {
		this.verb = verb;
	}



	/**
	 * Return the value associated with the column: adverb
	 */
	public java.lang.String getAdverb () {
		return adverb;
	}

	/**
	 * Set the value related to the column: adverb
	 * @param adverb the adverb value
	 */
	public void setAdverb (java.lang.String adverb) {
		this.adverb = adverb;
	}



	/**
	 * Return the value associated with the column: noun
	 */
	public java.lang.String getNoun () {
		return noun;
	}

	/**
	 * Set the value related to the column: noun
	 * @param noun the noun value
	 */
	public void setNoun (java.lang.String noun) {
		this.noun = noun;
	}



	/**
	 * Return the value associated with the column: template
	 */
	public java.lang.String getTemplate () {
		return template;
	}

	/**
	 * Set the value related to the column: template
	 * @param template the template value
	 */
	public void setTemplate (java.lang.String template) {
		this.template = template;
	}



	/**
	 * Return the value associated with the column: template_more
	 */
	public java.lang.String getTemplateMore () {
		return templateMore;
	}

	/**
	 * Set the value related to the column: template_more
	 * @param templateMore the template_more value
	 */
	public void setTemplateMore (java.lang.String templateMore) {
		this.templateMore = templateMore;
	}



	/**
	 * Return the value associated with the column: dynamics
	 */
	public java.util.Set<com.Qinmeiwei.web.pojo.Dynamic> getDynamics () {
		return dynamics;
	}

	/**
	 * Set the value related to the column: dynamics
	 * @param dynamics the dynamics value
	 */
	public void setDynamics (java.util.Set<com.Qinmeiwei.web.pojo.Dynamic> dynamics) {
		this.dynamics = dynamics;
	}

	public void addTodynamics (com.Qinmeiwei.web.pojo.Dynamic dynamic) {
		if (null == getDynamics()) setDynamics(new java.util.TreeSet<com.Qinmeiwei.web.pojo.Dynamic>());
		getDynamics().add(dynamic);
	}




	public boolean equals (Object obj) {
		if (null == obj) return false;
		if (!(obj instanceof com.Qinmeiwei.web.pojo.DynamicType)) return false;
		else {
			com.Qinmeiwei.web.pojo.DynamicType dynamicType = (com.Qinmeiwei.web.pojo.DynamicType) obj;
			if (null == this.getId() || null == dynamicType.getId()) return false;
			else return (this.getId().equals(dynamicType.getId()));
		}
	}

	public int hashCode () {
		if (Integer.MIN_VALUE == this.hashCode) {
			if (null == this.getId()) return super.hashCode();
			else {
				String hashStr = this.getClass().getName() + ":" + this.getId().hashCode();
				this.hashCode = hashStr.hashCode();
			}
		}
		return this.hashCode;
	}


	public String toString () {
		return super.toString();
	}


}